﻿using System.Collections.Generic;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using Twins.Interface;
using Twins.Interface.IHandler;

namespace Twins.Classes.Hanlder.HanlderExpression
{
    public class HanlderForIPostfixOperatorExpression : IHandler<IPostfixOperatorExpression>
    {
        public IEnumerable<ILineCode> DoFor(IPostfixOperatorExpression postfixOperatorExpression)
        {
            return new List<ILineCode>
                       {
                           new LineCode(postfixOperatorExpression, 
                               postfixOperatorExpression.OperatorSign.GetText())
                       };
        }

        public IEnumerable<ILineCode> DoFor(object obj)
        {
            return DoFor((IPostfixOperatorExpression)obj);
        }
    }
}